<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 版本接口
 */
class Version extends Api
{
    protected $noNeedRight = '*';
    public function _initialize()
    {
        parent::_initialize();
        $this->model = new \app\common\model\Version;
    }

    /**
     * 获取版本列表
     * @ApiTitle    (获取版本列表)
     * @ApiReturnParams   (name="code", type="integer", required=true, sample="0")
     * @ApiReturnParams   (name="msg", type="string", required=true, sample="查询成功")
     * @ApiReturn   ({
          'code':'200',
          'msg':'查询成功',
          'time': "",
          'data': $row
        })
     */
    public function versionIndex()
    {
        // 查询数据
        $rows = $this->model->field("newversion", "downloadurl")->select();
        $this->success('查询成功', $rows);
    }
}
